package com.xbongbong.paas.util;

import com.xbongbong.paas.exception.ExcelAnalysisException;
import com.xbongbong.paas.exception.ExcelTitleCheckException;
import com.xbongbong.paas.pojo.FieldAttrEntityForImport;
import com.xbongbong.paas.pojo.ReadExcelDataReturnPojo;
import com.xbongbong.paas.pojo.dto.ImportFormDataDTO;

import java.util.List;
/**
 * Excel数据读取委托接口
 * @author 魏荣杰
 * @date 2019/11/13 1:54 下午
 * @since v4.6.0
 * @version v4.6.0
 */
public interface ExcelReadDataDelegated {
    /**
     * 每获取一条记录，即写数据
     * 在flume里每获取一条记录即写，而不必缓存起来，可以大大减少内存的消耗，这里主要是针对flume读取大数据量excel来说的
     * Description:
     * @param sheetName
     * @param sheetIndex
     * @param totalRowCount
     * @param curRow
     * @param cellList
     * @return void
     * @throws 
     * @author 魏荣杰
     * @date 2019/11/13 3:01 下午
     */
    void readExcelData(String sheetName, int sheetIndex, int totalRowCount, int curRow, List<String> cellList);


    ReadExcelDataReturnPojo readExcelData(String sheetName, int sheetIndex, int totalRowCount, int curRow, List<String> cellList, List<List<String>> titleLists, List<FieldAttrEntityForImport> fieldAttrEntityForImportList, ImportFormDataDTO importFormDataDTO) throws ExcelTitleCheckException, ExcelAnalysisException;
}
